package xinxin.com.CommandPatternBasic;

import xinxin.com.CommandPatternBasic.Command.Command;
import xinxin.com.CommandPatternBasic.Command.Detail.CommandOne;
import xinxin.com.CommandPatternBasic.Command.Detail.CommandTwo;
import xinxin.com.CommandPatternBasic.Invoker.Invoker;
import xinxin.com.CommandPatternBasic.Receiver.Receiver;

public class CommandPatternBasic {
    public static void main(String[] args) {
        Receiver r = new Receiver();
        Command one = new CommandOne(r);
        Command two = new CommandTwo(r);
        Invoker i = new Invoker();
        i.addCommand(one);
        i.addCommand(two);
        i.ExcuteCommand();
    }
}
